home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-06-17 | 1.2 KB | 62 lines | [TEXT/dosa] |
- // DesktopWindow.java : this is a Java source code file for the program Facade.
- // Copyright 1998, Andrew S. Downs
- // andrew.downs@tulane.edu
- //
- // This source code is distributed as freeware.
- // Just keep this author information in the file. Enjoy!
-
- import java.awt.*;
- import java.io.*;
-
- public class DesktopWindow extends Window implements Serializable {
- // Window title
- String label;
-
- DesktopWindow() {
- super( new Frame() );
- this.setFont( new Font( "Dialog", Font.BOLD, 12 ) );
- }
-
- public void setLabel( String s ) {
- this.label = s;
- }
-
- public String getLabel() {
- return this.label;
- }
-
- // Accessors for individual location/size values
- public void setX( int i ) {
- this.setLocation( i, this.getLocation().y );
- }
-
- public int getX() {
- return this.getLocation().x;
- }
-
- public void setY( int i ) {
- this.setLocation( this.getLocation().x, i );
- }
-
- public int getY() {
- return this.getLocation().y;
- }
-
- public void setWidth( int i ) {
- this.setSize( i, this.getSize().height );
- }
-
- public int getWidth() {
- return this.getSize().width;
- }
-
- public void setHeight( int i ) {
- this.setSize( this.getSize().width, i );
- }
-
- public int getHeight() {
- return this.getSize().height;
- }
- }
-
-